import request from '@/common/request.js'

const api = {}
const PORT1 = 'shop'
const PORT2 = 'api'
// 登录
api.config = params => request.globalRequest(`${PORT1}/index/index`, 'GET', params, 1)
api.login = params => request.globalRequest(`${PORT1}/index/login`, 'POST', params, 1)
api.user = params => request.globalRequest(`${PORT1}/member/member_info`, 'GET', params, 1)
api.store = params => request.globalRequest(`${PORT1}/index/store_info`, 'POST', params, 1)
api.orderList = params => request.globalRequest(`${PORT1}/order/order`, 'POST', params, 1)
api.orderInfo = params => request.globalRequest(`${PORT1}/order/orderInfo`, 'GET', params, 1)
api.goods = params => request.globalRequest(`${PORT1}/index/goods`, 'GET', params, 1)
api.order = params => request.globalRequest(`${PORT1}/order/addOrder`, 'POST', params, 1)
api.addressList = params => request.globalRequest(`${PORT1}/member/address`, 'GET', params, 1)
api.address = params => request.globalRequest(`${PORT1}/member/saveAddress`, 'POST', params, 1)

export default api